package com.atguigu.gmall.list.respository;

import com.atguigu.gmall.list.bean.Person;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author 钟涛
 * @version 1.0
 * @description: TODO
 * @date 2021/12/17 18:46
 */
@Repository
public interface PersonEsRepository extends PagingAndSortingRepository<Person,Long> {
    //查出address模糊匹配
    List<Person> findAllByAddressLike (String address);

    //查出address like "武汉" AND 年龄 > 18 并且
    List<Person> findAllByAddressLikeAndAgeGreaterThanEqualAndBirthBetween(String address, Integer age, Date birth);
}

